package com.aaa.java04;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2022/7/5 15:20
 * @description：教师类 的父类是person extends  继承
 * @modified By：
 * @version: 1.0
 */
public class Teacher  extends  Person {
    int workId;

    static{
        System.out.println("静态代码块执行啦");
    }
    public Teacher() {
        super();
        System.out.println("子类构造器被调用了");
    }

    public Teacher(String name, int age, String sex, float height, float weight, int workId) {

        super(name, age, sex, height, weight);
        System.out.println("子类的有参构造器被调用了");
        this.workId = workId;

    }


    public static void coding(){

        System.out.println("编码");
    }
    public  void introduce(){
        System.out.println("自我介绍");
    }


    @Override
    public boolean isMarry(Person other) {
        return super.isMarry(other);
    }

    public static void main(String[] args) {
        Teacher teacher1= new Teacher("陈老师1",38,"男",3243,4325,10009);
        Teacher teacher2= new Teacher("陈老师2",38,"男",3243,4325,10009);
        //对象调用普通费静态方法
        teacher1.introduce();
        //类名直接调用静态函数方法
        Teacher.coding();
        /*  teacher.workId=10009;
        teacher.sex="男";
        teacher.age=38;
        teacher.height=3243;
        teacher.weight=4325;
        teacher.name="陈老师";
*/

    }
}
